﻿/****************POLLS***************************/

var Polls = new Object();

Polls.submitPoll = function(url)
{
    new Ajax.Request(url + '?command=submitPoll',
    {
        method:'post',
        parameters:  Form.serialize('poll_form'),
        onSuccess: function(transport)
                    {
                         var response = transport.responseText || "no response text";
				 GraffitiHelpers.statusMessage('error-messages', response, true);
                         $('message').value = '';
                     },
        onFailure: function()
        {
            
        }
  });

	document.poll_form.submit();
}
